package cn.mothin.frame.bean;

import java.util.Date;

import cn.mothin.frame.core.interfaces.ILoginUser;

@SuppressWarnings("serial")
public class LoginUser implements ILoginUser {
	private String id;
	private boolean superUser;
	private String sessionId;
	private String loginIp;
	private String name;
	private Date loginTime;

	public LoginUser(String id, String sessionId, String loginIp,
			boolean superUser) {
		this.id = id;
		this.sessionId = sessionId;
		this.loginIp = loginIp;
		this.superUser = superUser;
		loginTime = new Date(System.currentTimeMillis());
	}

	public LoginUser(String id, String name, String sessionId, String loginIp,
			boolean superUser) {
		this.id = id;
		this.sessionId = sessionId;
		this.loginIp = loginIp;
		this.superUser = superUser;
		this.name = name;
		loginTime = new Date(System.currentTimeMillis());
	}

	public String getId() {
		return id;
	}

	public String getSessionId() {
		return sessionId;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public String getName() {
		return name;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public boolean isSuperUser() {
		return superUser;
	}

}
